1.打开thickbox.js 文件.
2.搜索 urlNoQuery
找到如下代码:
if(url.indexOf('TB_iframe') != -1){
urlNoQuery = url.。。。之类把这里的 urlNoQuery句替换为:
urlNoQuery=url;
这是因为原文件中语句删除了url的所有参数,为了传递参数,必须使用原来的url。
修改后的部分:
if(url.indexOf('TB_iframe') != -1){ // either iframe or ajax window //urlNoQuery = url.split('TB_'); urlNoQuery = url; $("#TB_iframeContent").remove(); if(params['modal'] != "true"){ //iframe no modal $("#TB_window").append(""); }else{ //iframe modal $("#TB_overlay").unbind(); $("#TB_window").append(""); } }else{ // not an iframe, ajax if($("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){ //ajax no modal $("#TB_window").append(""+caption+""); }else{ //ajax modal $("#TB_overlay").unbind(); $("#TB_window").append(" "); } }else{ //this means the window is already up, we are just loading new content via ajax $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption); } }"+caption+"